package org.jeecg.modules.yc.web.entity;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @Description: 传感器
 * @Author: jeecg-boot
 * @Date:   2024-01-08
 * @Version: V1.0
 */
@Data
@TableName("yc_pd_device")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="yc_pd_device对象", description="传感器")
public class PdDevice implements Serializable {
    private static final long serialVersionUID = 1L;

	/**主键*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private Date createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
	/**更新日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private Date updateTime;
	/**所属部门*/
    @ApiModelProperty(value = "所属部门")
    private String sysOrgCode;
	/**设备名称*/
	@Excel(name = "设备名称", width = 15)
    @ApiModelProperty(value = "设备名称")
    private String name;
	/**设备编号*/
	@Excel(name = "设备编号", width = 15)
    @ApiModelProperty(value = "设备编号")
    private String no;
	/**通信状态*/
	@Excel(name = "通信状态", width = 15)
    @ApiModelProperty(value = "通信状态")
    private Integer communicationStatus;
	/**通信时间*/
	@Excel(name = "通信时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "通信时间")
    private Date communicationTime;
	/**温度*/
	@Excel(name = "温度", width = 15)
    @ApiModelProperty(value = "温度")
    private String temperature;
	/**局放强度*/
	@Excel(name = "局放强度", width = 15)
    @ApiModelProperty(value = "局放强度")
    private String pdStrength;
	/**电池电压*/
	@Excel(name = "电池电压", width = 15)
    @ApiModelProperty(value = "电池电压")
    private String voltage;
	/**湿度*/
	@Excel(name = "湿度", width = 15)
    @ApiModelProperty(value = "湿度")
    private Integer humidity;
	/**通信信号强度*/
	@Excel(name = "通信信号强度", width = 15)
    @ApiModelProperty(value = "通信信号强度")
    private String signalStrength;
	/**水位*/
	@Excel(name = "水位", width = 15)
    @ApiModelProperty(value = "水位")
    private Integer waterLevel;
	/**经度*/
	@Excel(name = "经度", width = 15)
    @ApiModelProperty(value = "经度")
    private String longitude;
	/**纬度*/
	@Excel(name = "纬度", width = 15)
    @ApiModelProperty(value = "纬度")
    private String latitude;
	/**设备类型*/
	@Excel(name = "设备类型", width = 15)
    @ApiModelProperty(value = "设备类型")
    @Dict(dicCode = "device_type")
    private String type;
	/**所属采集器编号*/
	@Excel(name = "所属采集器编号", width = 15, dictTable = "terminal", dicText = "name", dicCode = "id")
	@Dict(dictTable = "terminal", dicText = "name", dicCode = "id")
    @ApiModelProperty(value = "所属采集器编号")
    private String terminalId;

    /**所属接头*/
    @Excel(name = "所属接头", width = 15)
    @ApiModelProperty(value = "所属接头")
    @Dict(dictTable = "yc_cable_joint",dicCode = "id" ,dicText = "name")
    private String cableJointId;

    /**所属线路*/
    @Excel(name = "所属线路", width = 15)
    @ApiModelProperty(value = "所属线路")
    //@Dict(dictTable = "yc_cable_joint",dicCode = "id" ,dicText = "name")
    private String lineId;



    public static PdDevice.YcPdDeviceBuilder builder() {
        return new PdDevice.YcPdDeviceBuilder();
    }
    public static class YcPdDeviceBuilder {
        private String id;
        private String createBy;
        private Date createTime;
        private String updateBy;
        private Date updateTime;
        private String sysOrgCode;
        private String name;
        private String no;
        private Integer communicationStatus;
        private Date communicationTime;
        private String temperature;
        private String pdStrength;
        private String voltage;
        private Integer humidity;
        private String signalStrength;
        private Integer waterLevel;
        private String longitude;
        private String latitude;
        private String type;
        private String terminalId;
        private PdDevice ycPdDevice;

        YcPdDeviceBuilder() {
            ycPdDevice = new PdDevice();
        }

        public PdDevice.YcPdDeviceBuilder id(final String id) {
            ycPdDevice.setId(id);
            return this;
        }

        public PdDevice.YcPdDeviceBuilder no(final String no) {
            ycPdDevice.setNo (no);
            return this;
        }
        public PdDevice.YcPdDeviceBuilder communicationTime(final Date communicationTime) {
            ycPdDevice.setCommunicationTime(communicationTime);
            return this;
        }

        public PdDevice.YcPdDeviceBuilder temperature(final String temperature) {
            ycPdDevice.setTemperature(temperature);
            return this;
        }

        public PdDevice.YcPdDeviceBuilder pdStrength(final String pdStrength) {
            ycPdDevice.setPdStrength (pdStrength);
            return this;
        }

        public PdDevice.YcPdDeviceBuilder voltage(final String voltage) {
            ycPdDevice.setVoltage (voltage);
            return this;
        }

        public PdDevice.YcPdDeviceBuilder humidity(final Integer humidity) {
            ycPdDevice.setHumidity(humidity);
            return this;
        }

        public PdDevice.YcPdDeviceBuilder signalStrength(final String signalStrength) {
            ycPdDevice.setSignalStrength (signalStrength);
            return this;
        }

        public PdDevice.YcPdDeviceBuilder waterLevel(final Integer waterLevel) {
            ycPdDevice.setWaterLevel (waterLevel);
            return this;
        }

        public PdDevice.YcPdDeviceBuilder longitude(final String longitude) {
            ycPdDevice.setLongitude (longitude);
            return this;
        }

        public PdDevice.YcPdDeviceBuilder latitude(final String latitude) {
            ycPdDevice.setLatitude (latitude);
            return this;
        }


        public PdDevice.YcPdDeviceBuilder terminalId(final String terminalId) {
            ycPdDevice.setTerminalId ( terminalId);
            return this;
        }
        public PdDevice.YcPdDeviceBuilder sysOrgCode(final String sysOrgCode) {
            ycPdDevice.setSysOrgCode(sysOrgCode);
            return this;
        }
        public PdDevice.YcPdDeviceBuilder createBy(final String createBy) {
            ycPdDevice.setCreateBy(createBy);
            return this;
        }
        public PdDevice.YcPdDeviceBuilder name(final String name) {
            ycPdDevice.setName(name);
            return this;
        }
        public PdDevice.YcPdDeviceBuilder createTime(final Date createTime) {
            ycPdDevice.setCreateTime(createTime);
            return this;
        }
        public PdDevice build() {
            return ycPdDevice;
        }
    }
}
